package com.quyunshuo.module.home.fragment.video

import android.util.Log
import com.quyunshuo.androidbaseframemvvm.base.mvvm.m.BaseRepository
import com.quyunshuo.androidbaseframemvvm.network.bean.ArticleListRes2
import com.quyunshuo.androidbaseframemvvm.network.HomeApiService
import com.quyunshuo.androidbaseframemvvm.network.bean.BaseResponse
import javax.inject.Inject

/**
 * @author DBoy 2021/7/6 <p>
 * - 文件描述 :
 */
class VideoRepository @Inject constructor() : BaseRepository() {
    @Inject
    lateinit var mApi: HomeApiService

    /**
     * 模拟获取数据
     */
    fun getData(id:Int,page: Int) = request<BaseResponse<ArticleListRes2>> {
        var response = mApi.listProjects(page,id.toString())
        Log.d("test", "getData test: $response")
        emit(response)
    }
}